import React from 'react'
import styles from './index.module.scss'
import { Link } from 'react-router-dom'
export default  function HouseItem ({title,houseCode,houseImg,price,desc,tags}) {
    return (
    <Link to={`/details/${houseCode}`}  className={styles.house_item}>
        <img className={styles.house_item_img} src={`http://localhost:8080`+houseImg} alt="" />
        <div className={styles.house_item_info}>
          <h4 className={styles.house_item_name}>{title}</h4>
          <p className={styles.house_item_desc}>{desc}</p>
          <p className={styles.house_item_tags}>
            {tags.map(item=><span key={item}>{item}</span>)}
          </p>
          <p className={styles.house_item_price}>{price}</p>
        </div>
      </Link>
    )
  }

